\(\int e^{c (a+b x)} \cot (d+e x) \, dx\) [22]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 16, antiderivative size = 76 \[ \int e^{c (a+b x)} \cot (d+e x) \, dx=\frac {i e^{c (a+b x)}}{b c}-\frac {2 i e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (1,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )}{b c} \]

[Out]

I*exp(c*(b*x+a))/b/c-2*I*exp(c*(b*x+a))*hypergeom([1, -1/2*I*b*c/e],[1-1/2*I*b*c/e],exp(2*I*(e*x+d)))/b/c

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {4528, 2225, 2283} \[ \int e^{c (a+b x)} \cot (d+e x) \, dx=\frac {i e^{c (a+b x)}}{b c}-\frac {2 i e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (1,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )}{b c} \]

[In]

Int[E^(c*(a + b*x))*Cot[d + e*x],x]

[Out]

(I*E^(c*(a + b*x)))/(b*c) - ((2*I)*E^(c*(a + b*x))*Hypergeometric2F1[1, ((-1/2*I)*b*c)/e, 1 - ((I/2)*b*c)/e, E
^((2*I)*(d + e*x))])/(b*c)

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2283

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Simp
[a^p*(G^(h*(f + g*x))/(g*h*Log[G]))*Hypergeometric2F1[-p, g*h*(Log[G]/(d*e*Log[F])), g*h*(Log[G]/(d*e*Log[F]))
 + 1, Simplify[(-b/a)*F^(e*(c + d*x))]], x] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x] && (ILtQ[p, 0] || G
tQ[a, 0])

Rule 4528

Int[Cot[(d_.) + (e_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Dist[(-I)^n, Int[ExpandInteg
rand[F^(c*(a + b*x))*((1 + E^(2*I*(d + e*x)))^n/(1 - E^(2*I*(d + e*x)))^n), x], x], x] /; FreeQ[{F, a, b, c, d
, e}, x] && IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = -\left (i \int \left (-e^{c (a+b x)}-\frac {2 e^{c (a+b x)}}{-1+e^{2 i (d+e x)}}\right ) \, dx\right ) \\ & = i \int e^{c (a+b x)} \, dx+2 i \int \frac {e^{c (a+b x)}}{-1+e^{2 i (d+e x)}} \, dx \\ & = \frac {i e^{c (a+b x)}}{b c}-\frac {2 i e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (1,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )}{b c} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(163\) vs. \(2(76)=152\).

Time = 1.21 (sec) , antiderivative size = 163, normalized size of antiderivative = 2.14 \[ \int e^{c (a+b x)} \cot (d+e x) \, dx=\frac {e^{c (a+b x)} \left (2 i b c e^{2 i (d+e x)} \operatorname {Hypergeometric2F1}\left (1,1-\frac {i b c}{2 e},2-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )+i (b c+2 i e) \left (1+e^{2 i d}-2 e^{2 i d} \operatorname {Hypergeometric2F1}\left (1,-\frac {i b c}{2 e},1-\frac {i b c}{2 e},e^{2 i (d+e x)}\right )\right )\right )}{b c (b c+2 i e) \left (-1+e^{2 i d}\right )} \]

[In]

Integrate[E^(c*(a + b*x))*Cot[d + e*x],x]

[Out]

(E^(c*(a + b*x))*((2*I)*b*c*E^((2*I)*(d + e*x))*Hypergeometric2F1[1, 1 - ((I/2)*b*c)/e, 2 - ((I/2)*b*c)/e, E^(
(2*I)*(d + e*x))] + I*(b*c + (2*I)*e)*(1 + E^((2*I)*d) - 2*E^((2*I)*d)*Hypergeometric2F1[1, ((-1/2*I)*b*c)/e,
1 - ((I/2)*b*c)/e, E^((2*I)*(d + e*x))])))/(b*c*(b*c + (2*I)*e)*(-1 + E^((2*I)*d)))

Maple [F]

\[\int {\mathrm e}^{c \left (x b +a \right )} \cot \left (e x +d \right )d x\]

[In]

int(exp(c*(b*x+a))*cot(e*x+d),x)

[Out]

int(exp(c*(b*x+a))*cot(e*x+d),x)

Fricas [F]

\[ \int e^{c (a+b x)} \cot (d+e x) \, dx=\int { \cot \left (e x + d\right ) e^{\left ({\left (b x + a\right )} c\right )} \,d x } \]

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d),x, algorithm="fricas")

[Out]

integral(cot(e*x + d)*e^(b*c*x + a*c), x)

Sympy [F]

\[ \int e^{c (a+b x)} \cot (d+e x) \, dx=e^{a c} \int e^{b c x} \cot {\left (d + e x \right )}\, dx \]

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d),x)

[Out]

exp(a*c)*Integral(exp(b*c*x)*cot(d + e*x), x)

Maxima [F]

\[ \int e^{c (a+b x)} \cot (d+e x) \, dx=\int { \cot \left (e x + d\right ) e^{\left ({\left (b x + a\right )} c\right )} \,d x } \]

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d),x, algorithm="maxima")

[Out]

integrate(cot(e*x + d)*e^((b*x + a)*c), x)

Giac [F]

\[ \int e^{c (a+b x)} \cot (d+e x) \, dx=\int { \cot \left (e x + d\right ) e^{\left ({\left (b x + a\right )} c\right )} \,d x } \]

[In]

integrate(exp(c*(b*x+a))*cot(e*x+d),x, algorithm="giac")

[Out]

integrate(cot(e*x + d)*e^((b*x + a)*c), x)

Mupad [F(-1)]

Timed out. \[ \int e^{c (a+b x)} \cot (d+e x) \, dx=\int \mathrm {cot}\left (d+e\,x\right )\,{\mathrm {e}}^{c\,\left (a+b\,x\right )} \,d x \]

[In]

int(cot(d + e*x)*exp(c*(a + b*x)),x)

[Out]

int(cot(d + e*x)*exp(c*(a + b*x)), x)